package es.unileon.prg2.censo.iterator;

/**
 * @author Manuel Molinos Crespo, Adrian Campazas Vega, Alberto Castro Delgado, Pedro Alvarez Alvarez, Adrian Cabello Galvan, Jose Alvaro Fernandez Alvarez
 *
 */

import java.util.ArrayList;

import es.unileon.prg2.censo.composite.Component;
import es.unileon.prg2.censo.exception.CensoException;

public interface Iterador {
	
	/**
	 * Method used to modify the iterator position to the initial.
	 */
	void firstElement();
	
	/**
	 * Method used to modify the iterator position to the next component of the ArrayList.
	 * @throws CensoException
	 */
	void nextElement() throws CensoException;
	
	/**
	 * Method used to know if the iterator can move to the next element or the ArrayList haven't any more elements.
	 * @return If the iterator can move to the next element return True, else return False
	 * @throws CensoException
	 */
	boolean hasmoreElements() throws CensoException;
	
	/**
	 * Method used to return the Object that have the iterator position in the ArrayList.
	 * @return The component of the iterator position
	 */
	Object currentElement();
	
	/**
	 * Method used to return the position of the iterator.
	 * @return The position number of the iterator
	 */
	int getPosition();
	
	/**
	 * Method used to return the age max
	 * @return The age which is more big
	 */
	int getMax();
	
	/**
	 * Method used to return the age min
	 * @return The age which is more little
	 */
	int getMin();
	
	/**
	 * Method used to return the size of the ArrayList of the iterator.
	 * @return The number of components in its ArrayList of the iterator
	 */
	int getSizeIterator();

	void setMin(int i);

	void setMax(int i);


}
